package com.grocery.dao;

import com.grocery.bean.Product;
import com.grocery.util.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface ProductDao {
    int add(@Param("product") Product product);
    int delete(@Param("id") int id);
    int edit(@Param("product") Product product);
    Product getByID(@Param("id") int id);
    List<Product> getByState(@Param("state") int state);
    List<Product> getList(@Param("page") Page page,@Param("text") String text);
    int getCount(@Param("text") String text);
    List<Product> getAllList();
    List<Product> getallListbypid(@Param("pid") Integer pid);
}
